<!--
Copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
-->
<!-- boost-no-inspect -->
<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<title>Boost.Hana: boost::hana::pair&lt; First, Second &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
// Copyright Louis Dionne 2013-2017
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
MathJax.Hub.Config({
    "HTML-CSS": {
        linebreaks: {
            automatic: true,
            width: "75% container"
        }
    }
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<!-- Additional javascript for drawing charts. -->
<script type="text/javascript" src="highcharts.js"></script>
<script type="text/javascript" src="highcharts-data.js"></script>
<script type="text/javascript" src="highcharts-exporting.js"></script>
<script type="text/javascript" src="chart.js"></script>
<script type="text/javascript" src="hana.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Boost.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Boost.Hana
   &#160;<span id="projectnumber">1.7.1</span>
   </div>
   <div id="projectbrief">Your standard library for metaprogramming</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.svg"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structboost_1_1hana_1_1pair.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#related">Synopsis of associated functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="structboost_1_1hana_1_1pair-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">boost::hana::pair&lt; First, Second &gt; Struct Template Reference<div class="ingroups"><a class="el" href="group__group-datatypes.html">Data types</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<div class="textblock"><h3>template&lt;typename First, typename Second&gt;<br />
struct boost::hana::pair&lt; First, Second &gt;</h3>

<p>Generic container for two elements. </p>
<p><code><a class="el" href="structboost_1_1hana_1_1pair.html" title="Generic container for two elements.">hana::pair</a></code> is conceptually the same as <code><a class="el" href="structstd_1_1pair.html" title="Adaptation of std::pair for Hana.">std::pair</a></code>. However, <code><a class="el" href="structboost_1_1hana_1_1pair.html" title="Generic container for two elements.">hana::pair</a></code> automatically compresses the storage of empty types, and as a result it does not have the <code>.first</code> and <code>.second</code> members. Instead, one must use the <code><a class="el" href="group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4" title="Returns the first element of a pair.">hana::first</a></code> and <code><a class="el" href="group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077" title="Returns the second element of a pair.">hana::second</a></code> free functions to access the elements of a pair.</p>
<dl class="section note"><dt>Note</dt><dd>When you use a container, remember not to make assumptions about its representation, unless the documentation gives you those guarantees. More details <a class="el" href="index.html#tutorial-containers-types">in the tutorial</a>.</dd></dl>
<h2><a class="anchor" id="autotoc_md312"></a>
Modeled concepts</h2>
<ol type="1">
<li><code>Comparable</code><br  />
Two pairs <code>(x, y)</code> and &lsquo;(x&rsquo;, y')<code>are equal if and only if both </code>x == x'<code>and</code>y == y'`. <div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2017</span></div>
<div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="equal_8hpp.html">boost/hana/equal.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="not__equal_8hpp.html">boost/hana/not_equal.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div>
<div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) == hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(hana::make_pair(2, <span class="charliteral">&#39;x&#39;</span>) != hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;y&#39;</span>) != hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() { }</div>
<div class="ttc" id="aequal_8hpp_html"><div class="ttname"><a href="equal_8hpp.html">equal.hpp</a></div><div class="ttdoc">Defines boost::hana::equal.</div></div>
<div class="ttc" id="anamespaceboost_1_1hana_html"><div class="ttname"><a href="namespaceboost_1_1hana.html">boost::hana</a></div><div class="ttdoc">Namespace containing everything in the library.</div><div class="ttdef"><b>Definition:</b> accessors.hpp:20</div></div>
<div class="ttc" id="anot__equal_8hpp_html"><div class="ttname"><a href="not__equal_8hpp.html">not_equal.hpp</a></div><div class="ttdoc">Defines boost::hana::not_equal.</div></div>
<div class="ttc" id="apair_8hpp_html"><div class="ttname"><a href="pair_8hpp.html">pair.hpp</a></div><div class="ttdoc">Defines boost::hana::pair.</div></div>
</div><!-- fragment --></li>
<li><code>Orderable</code><br  />
Pairs are ordered as-if they were 2-element tuples, using a lexicographical ordering. <div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2017</span></div>
<div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="less_8hpp.html">boost/hana/less.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div>
<div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) &lt; hana::make_pair(1, <span class="charliteral">&#39;y&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) &lt; hana::make_pair(10, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;y&#39;</span>) &lt; hana::make_pair(10, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() { }</div>
<div class="ttc" id="aless_8hpp_html"><div class="ttname"><a href="less_8hpp.html">less.hpp</a></div><div class="ttdoc">Defines boost::hana::less.</div></div>
</div><!-- fragment --></li>
<li><code>Foldable</code><br  />
Folding a pair is equivalent to folding a 2-element tuple. In other words: <div class="fragment"><div class="line">fold_left(<a class="code" href="structboost_1_1hana_1_1pair.html#a1bc322b45af2148a413ba45ee8097045">make_pair</a>(x, y), s, f) == f(f(s, x), y)</div>
<div class="line">fold_right(<a class="code" href="structboost_1_1hana_1_1pair.html#a1bc322b45af2148a413ba45ee8097045">make_pair</a>(x, y), s, f) == f(x, f(y, s))</div>
<div class="ttc" id="astructboost_1_1hana_1_1pair_html_a1bc322b45af2148a413ba45ee8097045"><div class="ttname"><a href="structboost_1_1hana_1_1pair.html#a1bc322b45af2148a413ba45ee8097045">boost::hana::pair::make_pair</a></div><div class="ttdeci">constexpr auto make_pair</div><div class="ttdoc">Alias to make&lt;pair_tag&gt;; provided for convenience.</div><div class="ttdef"><b>Definition:</b> pair.hpp:155</div></div>
</div><!-- fragment --> Example: <div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2017</span></div>
<div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="fold__left_8hpp.html">boost/hana/fold_left.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="fold__right_8hpp.html">boost/hana/fold_right.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="minus_8hpp.html">boost/hana/minus.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="plus_8hpp.html">boost/hana/plus.hpp</a>&gt;</span></div>
<div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">static_assert(hana::fold_left(hana::make_pair(1, 3), 0, <a class="code" href="group__group-_monoid.html#gaeb5d4a1e967e319712f9e4791948896c">hana::plus</a>) == 4, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(hana::fold_right(hana::make_pair(1, 3), 0, <a class="code" href="group__group-_group.html#ga2020c526324f361a2b990fe8d1b07c20">hana::minus</a>) == -2, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() { }</div>
<div class="ttc" id="afold__left_8hpp_html"><div class="ttname"><a href="fold__left_8hpp.html">fold_left.hpp</a></div><div class="ttdoc">Defines boost::hana::fold_left.</div></div>
<div class="ttc" id="afold__right_8hpp_html"><div class="ttname"><a href="fold__right_8hpp.html">fold_right.hpp</a></div><div class="ttdoc">Defines boost::hana::fold_right.</div></div>
<div class="ttc" id="agroup__group-_group_html_ga2020c526324f361a2b990fe8d1b07c20"><div class="ttname"><a href="group__group-_group.html#ga2020c526324f361a2b990fe8d1b07c20">boost::hana::minus</a></div><div class="ttdeci">constexpr auto minus</div><div class="ttdoc">Subtract two elements of a group.</div><div class="ttdef"><b>Definition:</b> minus.hpp:51</div></div>
<div class="ttc" id="agroup__group-_monoid_html_gaeb5d4a1e967e319712f9e4791948896c"><div class="ttname"><a href="group__group-_monoid.html#gaeb5d4a1e967e319712f9e4791948896c">boost::hana::plus</a></div><div class="ttdeci">constexpr auto plus</div><div class="ttdoc">Associative binary operation on a Monoid.</div><div class="ttdef"><b>Definition:</b> plus.hpp:47</div></div>
<div class="ttc" id="aminus_8hpp_html"><div class="ttname"><a href="minus_8hpp.html">minus.hpp</a></div><div class="ttdoc">Defines boost::hana::minus.</div></div>
<div class="ttc" id="aplus_8hpp_html"><div class="ttname"><a href="plus_8hpp.html">plus.hpp</a></div><div class="ttdoc">Defines boost::hana::plus.</div></div>
</div><!-- fragment --></li>
<li><code>Product</code><br  />
The model of <code>Product</code> is the simplest one possible; the first element of a pair <code>(x, y)</code> is <code>x</code>, and its second element is <code>y</code>. <div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2017</span></div>
<div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="first_8hpp.html">boost/hana/first.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="second_8hpp.html">boost/hana/second.hpp</a>&gt;</span></div>
<div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">static_assert(<a class="code" href="group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4">hana::first</a>(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>)) == 1, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(<a class="code" href="group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">hana::second</a>(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>)) == <span class="charliteral">&#39;x&#39;</span>, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() { }</div>
<div class="ttc" id="afirst_8hpp_html"><div class="ttname"><a href="first_8hpp.html">first.hpp</a></div><div class="ttdoc">Defines boost::hana::first.</div></div>
<div class="ttc" id="agroup__group-_product_html_ga34bbf4281de06dc3540441e8b2bd24f4"><div class="ttname"><a href="group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4">boost::hana::first</a></div><div class="ttdeci">constexpr auto first</div><div class="ttdoc">Returns the first element of a pair.</div><div class="ttdef"><b>Definition:</b> first.hpp:33</div></div>
<div class="ttc" id="agroup__group-_product_html_ga7bb979d59ffc3ab862cb7d9dc7730077"><div class="ttname"><a href="group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">boost::hana::second</a></div><div class="ttdeci">constexpr auto second</div><div class="ttdoc">Returns the second element of a pair.</div><div class="ttdef"><b>Definition:</b> second.hpp:32</div></div>
<div class="ttc" id="asecond_8hpp_html"><div class="ttname"><a href="second_8hpp.html">second.hpp</a></div><div class="ttdoc">Defines boost::hana::second.</div></div>
</div><!-- fragment --> </li>
</ol>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a>
Synopsis of associated functions</h2></td></tr>
<tr class="memitem:aab78903e9982284e82744dec570afa8d"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:aab78903e9982284e82744dec570afa8d"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#aab78903e9982284e82744dec570afa8d">make&lt; pair_tag &gt;</a></td></tr>
<tr class="memdesc:aab78903e9982284e82744dec570afa8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <code><a class="el" href="structboost_1_1hana_1_1pair.html" title="Generic container for two elements.">hana::pair</a></code> with the given elements.  <a href="structboost_1_1hana_1_1pair.html#aab78903e9982284e82744dec570afa8d">More...</a><br /></td></tr>
<tr class="separator:aab78903e9982284e82744dec570afa8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bc322b45af2148a413ba45ee8097045"><td class="memItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a1bc322b45af2148a413ba45ee8097045">make_pair</a> = <a class="el" href="group__group-core.html#ga1d92480f0af1029878e773dafa3e2f60">make</a>&lt;<a class="el" href="structboost_1_1hana_1_1pair__tag.html">pair_tag</a>&gt;</td></tr>
<tr class="memdesc:a1bc322b45af2148a413ba45ee8097045"><td class="mdescLeft">&#160;</td><td class="mdescRight">Alias to <code>make&lt;<a class="el" href="structboost_1_1hana_1_1pair__tag.html" title="Tag representing hana::pair.">pair_tag</a>&gt;</code>; provided for convenience.  <a href="structboost_1_1hana_1_1pair.html#a1bc322b45af2148a413ba45ee8097045">More...</a><br /></td></tr>
<tr class="separator:a1bc322b45af2148a413ba45ee8097045"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a22bef1b2c14cf393a3a9cb1924d8c8ff"><td class="memTemplParams" colspan="2"><a id="a22bef1b2c14cf393a3a9cb1924d8c8ff"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:a22bef1b2c14cf393a3a9cb1924d8c8ff"><td class="memTemplItemLeft" align="right" valign="top">constexpr friend auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a22bef1b2c14cf393a3a9cb1924d8c8ff">operator==</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:a22bef1b2c14cf393a3a9cb1924d8c8ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-_comparable.html#gacaf1ebea6b3ab96ac9dcb82f0e64e547" title="Returns a Logical representing whether x is equal to y.">hana::equal</a></code> <br /></td></tr>
<tr class="separator:a22bef1b2c14cf393a3a9cb1924d8c8ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ecea0deb4c00ae2eb0b0713ee0645e9"><td class="memTemplParams" colspan="2"><a id="a4ecea0deb4c00ae2eb0b0713ee0645e9"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:a4ecea0deb4c00ae2eb0b0713ee0645e9"><td class="memTemplItemLeft" align="right" valign="top">constexpr friend auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a4ecea0deb4c00ae2eb0b0713ee0645e9">operator!=</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:a4ecea0deb4c00ae2eb0b0713ee0645e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-_comparable.html#gae33be2e0d5e04f19082f4b7740dfc9cd" title="Returns a Logical representing whether x is not equal to y.">hana::not_equal</a></code> <br /></td></tr>
<tr class="separator:a4ecea0deb4c00ae2eb0b0713ee0645e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca31ad50b2d35d48aac88aa762530c75"><td class="memTemplParams" colspan="2"><a id="aca31ad50b2d35d48aac88aa762530c75"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:aca31ad50b2d35d48aac88aa762530c75"><td class="memTemplItemLeft" align="right" valign="top">constexpr friend auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#aca31ad50b2d35d48aac88aa762530c75">operator&lt;</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:aca31ad50b2d35d48aac88aa762530c75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-_orderable.html#gad510011602bdb14686f1c4ec145301c9" title="Returns a Logical representing whether x is less than y.">hana::less</a></code> <br /></td></tr>
<tr class="separator:aca31ad50b2d35d48aac88aa762530c75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65b9400772e651101ae83d7f9f7ba84d"><td class="memTemplParams" colspan="2"><a id="a65b9400772e651101ae83d7f9f7ba84d"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:a65b9400772e651101ae83d7f9f7ba84d"><td class="memTemplItemLeft" align="right" valign="top">constexpr friend auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a65b9400772e651101ae83d7f9f7ba84d">operator&gt;</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:a65b9400772e651101ae83d7f9f7ba84d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-_orderable.html#gaf9a073eafebbe514fb19dff82318f198" title="Returns a Logical representing whether x is greater than y.">hana::greater</a></code> <br /></td></tr>
<tr class="separator:a65b9400772e651101ae83d7f9f7ba84d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a971bac762b767fe0ec222adb367c9aeb"><td class="memTemplParams" colspan="2"><a id="a971bac762b767fe0ec222adb367c9aeb"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:a971bac762b767fe0ec222adb367c9aeb"><td class="memTemplItemLeft" align="right" valign="top">constexpr friend auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a971bac762b767fe0ec222adb367c9aeb">operator&lt;=</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:a971bac762b767fe0ec222adb367c9aeb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-_orderable.html#ga9917dd82beb67151bf5657245d37b851" title="Returns a Logical representing whether x is less than or equal to y.">hana::less_equal</a></code> <br /></td></tr>
<tr class="separator:a971bac762b767fe0ec222adb367c9aeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adec95a8109b858673412671ba341611b"><td class="memTemplParams" colspan="2"><a id="adec95a8109b858673412671ba341611b"></a>
template&lt;typename X , typename Y &gt; </td></tr>
<tr class="memitem:adec95a8109b858673412671ba341611b"><td class="memTemplItemLeft" align="right" valign="top">constexpr friend auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#adec95a8109b858673412671ba341611b">operator&gt;=</a> (X &amp;&amp;x, Y &amp;&amp;y)</td></tr>
<tr class="memdesc:adec95a8109b858673412671ba341611b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code><a class="el" href="group__group-_orderable.html#ga6023631e7d0a01e16dc3fa4221fbd703" title="Returns a Logical representing whether x is greater than or equal to y.">hana::greater_equal</a></code> <br /></td></tr>
<tr class="separator:adec95a8109b858673412671ba341611b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acb8494edc410c10d824e942341f30719"><td class="memItemLeft" align="right" valign="top"><a id="acb8494edc410c10d824e942341f30719"></a>
constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#acb8494edc410c10d824e942341f30719">pair</a> ()</td></tr>
<tr class="memdesc:acb8494edc410c10d824e942341f30719"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructs the <code>pair</code>. Only exists when both elements of the pair are default constructible. <br /></td></tr>
<tr class="separator:acb8494edc410c10d824e942341f30719"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad258681a711a7bf24d79e9d13a7a441e"><td class="memItemLeft" align="right" valign="top"><a id="ad258681a711a7bf24d79e9d13a7a441e"></a>
constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#ad258681a711a7bf24d79e9d13a7a441e">pair</a> (First const &amp;<a class="el" href="group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4">first</a>, Second const &amp;<a class="el" href="group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">second</a>)</td></tr>
<tr class="memdesc:ad258681a711a7bf24d79e9d13a7a441e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize each element of the pair with the corresponding element. Only exists when both elements of the pair are copy-constructible. <br /></td></tr>
<tr class="separator:ad258681a711a7bf24d79e9d13a7a441e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae31a284451c1c0486339c289a7887fe"><td class="memTemplParams" colspan="2"><a id="aae31a284451c1c0486339c289a7887fe"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:aae31a284451c1c0486339c289a7887fe"><td class="memTemplItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#aae31a284451c1c0486339c289a7887fe">pair</a> (T &amp;&amp;t, U &amp;&amp;u)</td></tr>
<tr class="memdesc:aae31a284451c1c0486339c289a7887fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize both elements of the pair by perfect-forwarding the corresponding argument. Only exists when both arguments are implicitly-convertible to the corresponding element of the pair. <br /></td></tr>
<tr class="separator:aae31a284451c1c0486339c289a7887fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad295aada872521bce6e7775795b8318e"><td class="memTemplParams" colspan="2"><a id="ad295aada872521bce6e7775795b8318e"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:ad295aada872521bce6e7775795b8318e"><td class="memTemplItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#ad295aada872521bce6e7775795b8318e">pair</a> (<a class="el" href="structboost_1_1hana_1_1pair.html">pair</a>&lt; T, U &gt; const &amp;other)</td></tr>
<tr class="memdesc:ad295aada872521bce6e7775795b8318e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy-initialize a pair from another pair. Only exists when both elements of the source pair are implicitly convertible to the corresponding element of the constructed pair. <br /></td></tr>
<tr class="separator:ad295aada872521bce6e7775795b8318e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a962bff38110b5c39b1267fc88851198d"><td class="memTemplParams" colspan="2"><a id="a962bff38110b5c39b1267fc88851198d"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:a962bff38110b5c39b1267fc88851198d"><td class="memTemplItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a962bff38110b5c39b1267fc88851198d">pair</a> (<a class="el" href="structboost_1_1hana_1_1pair.html">pair</a>&lt; T, U &gt; &amp;&amp;other)</td></tr>
<tr class="memdesc:a962bff38110b5c39b1267fc88851198d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move-initialize a pair from another pair. Only exists when both elements of the source pair are implicitly convertible to the corresponding element of the constructed pair. <br /></td></tr>
<tr class="separator:a962bff38110b5c39b1267fc88851198d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96ada4b84949f1653de497410af50013"><td class="memTemplParams" colspan="2"><a id="a96ada4b84949f1653de497410af50013"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:a96ada4b84949f1653de497410af50013"><td class="memTemplItemLeft" align="right" valign="top">constexpr <a class="el" href="structboost_1_1hana_1_1pair.html">pair</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a96ada4b84949f1653de497410af50013">operator=</a> (<a class="el" href="structboost_1_1hana_1_1pair.html">pair</a>&lt; T, U &gt; const &amp;other)</td></tr>
<tr class="memdesc:a96ada4b84949f1653de497410af50013"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign a pair to another pair. Only exists when both elements of the destination pair are assignable from the corresponding element in the source pair. <br /></td></tr>
<tr class="separator:a96ada4b84949f1653de497410af50013"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f1a25445fa5380a78bdf524b764e1c7"><td class="memTemplParams" colspan="2"><a id="a3f1a25445fa5380a78bdf524b764e1c7"></a>
template&lt;typename T , typename U &gt; </td></tr>
<tr class="memitem:a3f1a25445fa5380a78bdf524b764e1c7"><td class="memTemplItemLeft" align="right" valign="top">constexpr <a class="el" href="structboost_1_1hana_1_1pair.html">pair</a> &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structboost_1_1hana_1_1pair.html#a3f1a25445fa5380a78bdf524b764e1c7">operator=</a> (<a class="el" href="structboost_1_1hana_1_1pair.html">pair</a>&lt; T, U &gt; &amp;&amp;other)</td></tr>
<tr class="memdesc:a3f1a25445fa5380a78bdf524b764e1c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move-assign a pair to another pair. Only exists when both elements of the destination pair are move-assignable from the corresponding element in the source pair. <br /></td></tr>
<tr class="separator:a3f1a25445fa5380a78bdf524b764e1c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Associated functions</h2>
<a id="aab78903e9982284e82744dec570afa8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab78903e9982284e82744dec570afa8d">&#9670;&nbsp;</a></span>make&lt; pair_tag &gt;</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename First , typename Second &gt; </div>
<div class="memtemplate">
template&lt;&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr auto <a class="el" href="group__group-core.html#ga1d92480f0af1029878e773dafa3e2f60">make</a>&lt; <a class="el" href="structboost_1_1hana_1_1pair__tag.html">pair_tag</a> &gt;</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= [](<span class="keyword">auto</span>&amp;&amp; <a class="code" href="group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4">first</a>, <span class="keyword">auto</span>&amp;&amp; <a class="code" href="group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">second</a>)</div>
<div class="line">        -&gt; hana::pair&lt;std::decay_t&lt;decltype(<a class="code" href="group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4">first</a>)&gt;, std::decay_t&lt;decltype(<a class="code" href="group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">second</a>)&gt;&gt;</div>
<div class="line">    {</div>
<div class="line">        <span class="keywordflow">return</span> {forwarded(<a class="code" href="group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4">first</a>), forwarded(<a class="code" href="group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">second</a>)};</div>
<div class="line">    }</div>
</div><!-- fragment -->
<p>Creates a <code><a class="el" href="structboost_1_1hana_1_1pair.html" title="Generic container for two elements.">hana::pair</a></code> with the given elements. </p>
<h2><a class="anchor" id="autotoc_md313"></a>
Example</h2>
<div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2017</span></div>
<div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="core_2make_8hpp.html">boost/hana/core/make.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="equal_8hpp.html">boost/hana/equal.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="first_8hpp.html">boost/hana/first.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="second_8hpp.html">boost/hana/second.hpp</a>&gt;</span></div>
<div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">static_assert(<a class="code" href="group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4">hana::first</a>(hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>)) == 1, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(<a class="code" href="group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">hana::second</a>(hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>)) == <span class="charliteral">&#39;x&#39;</span>, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) == hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() { }</div>
<div class="ttc" id="acore_2make_8hpp_html"><div class="ttname"><a href="core_2make_8hpp.html">make.hpp</a></div><div class="ttdoc">Defines boost::hana::make.</div></div>
</div><!-- fragment --> 
</div>
</div>
<a id="a1bc322b45af2148a413ba45ee8097045"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1bc322b45af2148a413ba45ee8097045">&#9670;&nbsp;</a></span>make_pair</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename First , typename Second &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr auto make_pair = <a class="el" href="group__group-core.html#ga1d92480f0af1029878e773dafa3e2f60">make</a>&lt;<a class="el" href="structboost_1_1hana_1_1pair__tag.html">pair_tag</a>&gt;</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">related</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Alias to <code>make&lt;<a class="el" href="structboost_1_1hana_1_1pair__tag.html" title="Tag representing hana::pair.">pair_tag</a>&gt;</code>; provided for convenience. </p>
<h2><a class="anchor" id="autotoc_md314"></a>
Example</h2>
<div class="fragment"><div class="line"><span class="comment">// Copyright Louis Dionne 2013-2017</span></div>
<div class="line"><span class="comment">// Distributed under the Boost Software License, Version 1.0.</span></div>
<div class="line"><span class="comment">// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="core_2make_8hpp.html">boost/hana/core/make.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="equal_8hpp.html">boost/hana/equal.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="first_8hpp.html">boost/hana/first.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="pair_8hpp.html">boost/hana/pair.hpp</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="second_8hpp.html">boost/hana/second.hpp</a>&gt;</span></div>
<div class="line"><span class="keyword">namespace </span>hana = <a class="code" href="namespaceboost_1_1hana.html">boost::hana</a>;</div>
<div class="line"> </div>
<div class="line"> </div>
<div class="line">static_assert(<a class="code" href="group__group-_product.html#ga34bbf4281de06dc3540441e8b2bd24f4">hana::first</a>(hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>)) == 1, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(<a class="code" href="group__group-_product.html#ga7bb979d59ffc3ab862cb7d9dc7730077">hana::second</a>(hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>)) == <span class="charliteral">&#39;x&#39;</span>, <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line">static_assert(hana::make_pair(1, <span class="charliteral">&#39;x&#39;</span>) == hana::make&lt;hana::pair_tag&gt;(1, <span class="charliteral">&#39;x&#39;</span>), <span class="stringliteral">&quot;&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">int</span> main() { }</div>
</div><!-- fragment --> 
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
Copyright Louis Dionne 2013-2017
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
-->
<!-- boost-no-inspect -->
<!-- HTML footer for doxygen 1.8.9.1-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>boost</b></li><li class="navelem"><a class="el" href="namespaceboost_1_1hana.html">hana</a></li><li class="navelem"><a class="el" href="structboost_1_1hana_1_1pair.html">pair</a></li>
  </ul>
</div>
</body>
</html>
